package com.fjeld.swingx;

import com.fjeld.swingx.table.HeaderCellRenderer;

import javax.swing.*;
import javax.swing.table.TableModel;

/**
 * Created by IntelliJ IDEA.
 * User: fjeld
 * Date: 28/12/2011
 * Time: 14:41
 *
 * A transparent table
 */
public class JTransparentTable extends JTable
{
    public JTransparentTable(TableModel tableModel)
    {
        super(tableModel);
        getTableHeader().setDefaultRenderer(new HeaderCellRenderer());
        setOpaque(false);
        setBackground(ColorConstants.TRANSPARENT);
        setGridColor(ColorConstants.GRID_COLOR);
        setForeground(ColorConstants.TEXT_NORMAL);
        setAutoCreateRowSorter(true);
    }
}
